package cn.wolfcode.trip.base.domain;

import cn.wolfcode.trip.base.util.JSONUtil;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;

/**
 * 产品
 */
@Getter@Setter
public class Product extends BaseDomain{

    private String info;//产品信息

    private String imgUrls;//产品图

    private Integer integral;//所需积分

    private Integer type;//产品类型

    private Integer amount;//库存
    //购物车 有空再优化
    private ShopingCar shopingCar;

    private Long orderId;

    public String getJson(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("info",info);
        map.put("imgUrls",imgUrls);
        map.put("integral",integral);
        map.put("type",type);
        map.put("amount",amount);
        return JSONUtil.toJSONString(map);
    }


}